package com.monlyu.action.sql;

import com.monlyu.action.BaseAction;
import com.monlyu.bo.SqlBo;

/**
 * 直接通过前台输入sql语句操作后台数据库，超级权限才可以做
 * http://localhost:8088/news/sql/Sql!toInput.action
 */
public class SqlAction extends BaseAction {

	private String sql;
	private SqlBo sqlBo;

	public void setSql(String sql) {
		this.sql = sql;
	}

	public String execute() {
		return ajax(sqlBo.excuteSql(sql) + "");
	}

	public String toInput() {
		return view("sql.jsp");
	}

	public String getSql() {
		return sql;
	}

	public void setSqlBo(SqlBo sqlBo) {
		this.sqlBo = sqlBo;
	}
}
